package com.fileshare.web.entity;

import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.command.BaseModel;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.*;

import java.util.Date;

import static com.fileshare.web.constant.EntityConstant.SEQ_LEN;

@Table(name = "authority")
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class Authority extends BaseModel {
    @Column(name = "id", type = MySqlTypeConstant.INT, length = 11, isKey = true, isAutoIncrement = true)
    private Integer id;

    @Column(name = "authority_name", type = MySqlTypeConstant.VARCHAR, length = 64)
    private String authorityName;

    @Column(name = "create_at", type = MySqlTypeConstant.DATETIME)
    private Date createAt;

    @Column(name = "update_at", type = MySqlTypeConstant.DATETIME)
    private Date updateAt;

    @Column(name = "create_by", type = MySqlTypeConstant.CHAR, length = SEQ_LEN)
    private String createBy;

    @Column(name = "update_by", type = MySqlTypeConstant.CHAR, length = SEQ_LEN)
    private String updateBy;
}
